package com.aiyige.base.glide;

import android.content.Context;
import android.widget.ImageView;

import com.aiyige.utils.banner.BannerAdapter;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.youth.banner.loader.ImageLoader;

/**
 * Created by zhuyakun on 2017/10/19.
 */

public class GlideBannerImageLoader extends ImageLoader {
    @Override
    public void displayImage(Context context, Object path, ImageView imageView) {
        Glide.with(context)
                .load(((BannerAdapter.Data) path).getUrl())
                .apply(RequestOptions.centerCropTransform())
                .into(imageView);
    }
}